SutList
is a generic container that is a dynamically sized array of portable void pointers. It frees the developer from the need to deal with link list logic or resizing arrays, plus SutList
handles array bound checks. Sapphire/Web's tool, gateway, and CGI client library were developed using SutList
. The use of the container proved to be the biggest productivity boost we have had for development. Whenever you think of things in the plural sense, we use a SutList.
The concepts are simple to use. Read the SutList
man
pages for a description of the functionality and for some example code. Some of the source code delivered in the contrib
subtree and the client/src
directory of the distribution show other examples. If you currently have a favorite container, for example C++ bag or set, then use that.
SutList
has some limitations. Since it only handles void pointers, you must type-cast all return values to the proper type. Although efficient in read operations, it is sometimes inefficient in adding or removing items-and its memory usage is somewhat inefficient. See Chapter 2, "Sapphire/Web Client API", SutDeleteList
and SutDestroyList
.